package com.dailywork.basepro.extend;

import java.util.Objects;

/**
 * java安全：平台安全和应用程序安全
 *
 * @author think   vm参数需要配置-Djava.security.manager启动SecurityMananger
 * @version 1.0.0
 * @since 2020/3/31
 */
public class SecurityPro {
    public static void main(String[] args) {
        SecurityManager securityManager = System.getSecurityManager();
        if (Objects.nonNull(securityManager)) {
            securityManager.checkPropertyAccess("java.version");
        }
        System.setProperty("java.version", "1.7");
        System.out.println(System.getProperty("java.version"));
    }
}
